// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
//
// $Id: callbacks.hpp 210 2008-08-28 10:10:41Z heavyzheng $
//

#ifndef ZZHENG_XML_DOM_LIBXML2_CALLBACKS_HPP_20080717__
#define ZZHENG_XML_DOM_LIBXML2_CALLBACKS_HPP_20080717__

#include <zzheng/xml/config.hpp>
#include <zzheng/xml/dom/libxml2/libxml2_fwd.hpp>

namespace zzheng {
namespace xml {
namespace dom {
namespace libxml2_ {

    //! Callback function invoked by libxml2 whenever an xmlNode has been constructed.
    //! \param px  the libxml2 node object constructed.
    void on_node_construct(xmlNode* px);

    //! Callback function invoked by libxml2 whenever an xmlNode is to be destructed.
    //! \param px  the libxml2 node to be destructed.
    void on_node_destruct(xmlNode* px);

    //! Registers callback functions to libxml2. This function should only be called once.
    void register_callbacks();

} // namespace zzheng::xml::dom::libxml2_
} // namespace zzheng::xml::dom
} // namespace zzheng::xml
} // namespace zzheng

#endif // ZZHENG_XML_DOM_LIBXML2_CALLBACKS_HPP_20080717__




